Skip to content

Rspec tests fail due to tilt dependency #243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 21, 2015
Merged

Rspec tests fail due to tilt dependency #243

merged 2 commits into from
Apr 21, 2015

Conversation

gbanis
Copy link
Contributor

@gbanis gbanis commented Apr 14, 2015

I am using react-rails as dependency in a gem I created and running rspec in that gem throws the following error:

$ rspec
/Users/gbanis/.rvm/gems/ruby-2.0.0-p598/gems/react-rails-0.13.0.0/lib/react/jsx/template.rb:1:in `require': cannot load such file -- tilt (LoadError)
    from /Users/gbanis/.rvm/gems/ruby-2.0.0-p598/gems/react-rails-0.13.0.0/lib/react/jsx/template.rb:1:in `<top (required)>'
    from /Users/gbanis/.rvm/gems/ruby-2.0.0-p598/gems/react-rails-0.13.0.0/lib/react/jsx.rb:3:in `require'
    from /Users/gbanis/.rvm/gems/ruby-2.0.0-p598/gems/react-rails-0.13.0.0/lib/react/jsx.rb:3:in `<top (required)>'
    from /Users/gbanis/.rvm/gems/ruby-2.0.0-p598/gems/react-rails-0.13.0.0/lib/react-rails.rb:1:in `require'
    from /Users/gbanis/.rvm/gems/ruby-2.0.0-p598/gems/react-rails-0.13.0.0/lib/react-rails.rb:1:in `<top (required)>'
    ...

This happens because react-rails requires tilt here.

I've noticed that adding tilt as a dependency in the gemspec solves this issue and all other tests run without a problem.

I am using `react-rails` as dependency in a gem I created and running `rspec` in that gem throws the following error:

```
$ rspec
/Users/gbanis/.rvm/gems/ruby-2.0.0-p598/gems/react-rails-0.13.0.0/lib/react/jsx/template.rb:1:in `require': cannot load such file -- tilt (LoadError)
	from /Users/gbanis/.rvm/gems/ruby-2.0.0-p598/gems/react-rails-0.13.0.0/lib/react/jsx/template.rb:1:in `<top (required)>'
	from /Users/gbanis/.rvm/gems/ruby-2.0.0-p598/gems/react-rails-0.13.0.0/lib/react/jsx.rb:3:in `require'
	from /Users/gbanis/.rvm/gems/ruby-2.0.0-p598/gems/react-rails-0.13.0.0/lib/react/jsx.rb:3:in `<top (required)>'
	from /Users/gbanis/.rvm/gems/ruby-2.0.0-p598/gems/react-rails-0.13.0.0/lib/react-rails.rb:1:in `require'
	from /Users/gbanis/.rvm/gems/ruby-2.0.0-p598/gems/react-rails-0.13.0.0/lib/react-rails.rb:1:in `<top (required)>'
	...
```

This happens because `react-rails` requires `tilt` [here](https://github.com/reactjs/react-rails/blob/0.13/lib/react/jsx/template.rb).

I've noticed that adding `tilt` as a dependency in the `gemspec` solves this issue and all other tests run without a problem.
@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks!

@@ -21,6 +21,7 @@ Gem::Specification.new do |s|
s.add_dependency 'execjs'
s.add_dependency 'rails', '>= 3.1'
s.add_dependency 'react-source', '0.13.0'
spec.add_dependency 'tilt'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s, not spec

@zpao
Copy link
Member

zpao commented Apr 14, 2015

Can you actually do a PR against master as well? That makes sure it goes into the major releases.

@gbanis
Copy link
Contributor Author

gbanis commented Apr 16, 2015

@zpao Sure
@facebook-github-bot All set

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

rmosolgo pushed a commit that referenced this pull request Apr 21, 2015
Rspec tests fail due to `tilt` dependency
@rmosolgo rmosolgo merged commit ef2619e into reactjs:0.13 Apr 21, 2015
@rmosolgo
Copy link
Member

cool

@zpao
Copy link
Member

zpao commented Apr 21, 2015

I can ship 0.13.2.0 with this and React 0.13.2. We could also do 0.13.1.1 if you want with just this.

@gbanis-fiksu
Copy link

I'll make another PR to add this in 1.0.
Is there a reason why this doesn't get carried with the new versions?

gbanis-fiksu added a commit to gbanis-fiksu/react-rails that referenced this pull request May 27, 2015
For more info look at PRs [248](reactjs#248) and [243](reactjs#243).
gbanis-fiksu added a commit to gbanis-fiksu/react-rails that referenced this pull request May 27, 2015
For more info look at PRs [248](reactjs#248) and [243](reactjs#243).
This was referenced May 27, 2015
@rmosolgo
Copy link
Member

No good reason, only poor maintaining on my part 😬 Yeah, I just pushed the 1.0-stable branch for that purpose!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants